﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" 
  xmlns:Sys="clr-namespace:System;assembly=mscorlib"
  xmlns:Controls="clr-namespace:dotNails.UI.Controls" >

	<Geometry x:Key="Checkmark">M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z</Geometry>
	<Geometry x:Key="CheckBoxMark">F1 M 14.3268,1.30162L 14.6279,1.83659C 12.6725,3.25875 10.8611,5.05914 9.19373,7.23778C 7.5264,9.41643 6.32258,11.5502 5.58227,13.6391L 5.14196,13.9382C 4.76209,14.1907 4.4351,14.4444 4.16099,14.6991C 4.11351,14.451 3.98293,14.0523 3.76925,13.5029L 3.53938,12.9148C 3.0408,11.6455 2.61939,10.7583 2.27513,10.2532C 1.93087,9.74815 1.55909,9.47458 1.1598,9.43249C 1.69939,8.97394 2.16991,8.74467 2.57136,8.74467C 3.12606,8.74467 3.73364,9.4923 4.39409,10.9876L 4.75346,11.7917C 5.93408,9.61413 7.35967,7.60828 9.03024,5.7741C 10.7008,3.93992 12.4663,2.44909 14.3268,1.30162 Z</Geometry>
	<Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>

	<Style x:Key="{x:Type TextBlock}" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
		<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
	</Style>

	<Style x:Key="{x:Type Window}" TargetType="{x:Type Window}">
		<Setter Property="Background" Value="{DynamicResource MainWindowBackgroundBrush}" />
	</Style>

	<Style x:Key="{x:Type UserControl}" TargetType="{x:Type UserControl}">
		<Setter Property="Background" Value="{DynamicResource MainWindowBackgroundBrush}" />
	</Style>

	<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
		<Setter Property="Background">
			<Setter.Value>
				<RadialGradientBrush>
					<RadialGradientBrush.GradientStops>
						<GradientStop Offset="0" Color="Black" />
						<GradientStop Offset="1" Color="Black" />
					</RadialGradientBrush.GradientStops>
				</RadialGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="Height" Value="40" />
		<Setter Property="Foreground" Value="white" />
		<!--<Setter Property="Margin" Value="3" />-->
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Rectangle x:Name="GelBackground" Opacity="1" RadiusX="9" RadiusY="9" Fill="{TemplateBinding  Background}" StrokeThickness="0.35">
							<Rectangle.Stroke>
								<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
									<LinearGradientBrush.GradientStops>
										<GradientStop Offset="0" Color="White" />
										<GradientStop Offset="1" Color="#666666" />
									</LinearGradientBrush.GradientStops>
								</LinearGradientBrush>
							</Rectangle.Stroke>
						</Rectangle>
						<Rectangle x:Name="GelShine" Margin="2,2,2,0" VerticalAlignment="Top" RadiusX="6" RadiusY="6" Opacity="1" Stroke="Transparent" Height="15px">
							<Rectangle.Fill>
								<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
									<LinearGradientBrush.GradientStops>
										<GradientStop Offset="0" Color="#ccffffff" />
										<GradientStop Offset="1" Color="Transparent" />
									</LinearGradientBrush.GradientStops>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>

						<ContentPresenter x:Name="GelButtonContent" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding  Content}" />
					</Grid>

					<ControlTemplate.Triggers>

						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Rectangle.Fill" TargetName="GelBackground">
								<Setter.Value>
									<RadialGradientBrush>
										<RadialGradientBrush.GradientStops>
											<GradientStop Offset="0" Color="Lime" />
											<GradientStop Offset="1" Color="DarkGreen" />
										</RadialGradientBrush.GradientStops>
									</RadialGradientBrush>
								</Setter.Value>
							</Setter>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Rectangle.Fill" TargetName="GelBackground">
								<Setter.Value>
									<RadialGradientBrush>
										<RadialGradientBrush.GradientStops>
											<GradientStop Offset="0" Color="#ffcc00" />
											<GradientStop Offset="1" Color="#cc9900" />
										</RadialGradientBrush.GradientStops>
									</RadialGradientBrush>
								</Setter.Value>
							</Setter>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Foreground" Value="Black " />
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter Property="Foreground" Value="Black " />
			</Trigger>
		</Style.Triggers>
	</Style>

	<Style x:Key="Header" TargetType="Grid">
		<Setter Property="Margin" Value="7" />
		<Setter Property="Grid.Row" Value="0"/>
	</Style>

	<Style x:Key="HeaderBorder" TargetType="Border">
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="CornerRadius" Value="10"/>
		<Setter Property="BorderBrush" Value="Black"/>
		<Setter Property="BorderThickness" Value="2"/>
		<Setter Property="Background" Value="#FF676767"/>
		<Setter Property="Margin" Value="0 3 0 3"/>
		<Setter Property="Grid.Column" Value="0"/>
	</Style>

	<Style x:Key="ContentBorder" TargetType="{x:Type Border}">
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="CornerRadius" Value="4 4 4 4"/>
		<Setter Property="BorderBrush" Value="Black"/>
		<Setter Property="Background" Value="#FF444444"/>
		<Setter Property="Margin" Value="2 2 2 2"/>
	</Style>

	<Style x:Key="H1" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="FontSize" Value="22"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="Margin" Value="10,0,0,5"/>
	</Style>

	<Style x:Key="H2" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="FontSize" Value="22"/>
		<Setter Property="Margin" Value="10,3,0,0"/>
	</Style>

	<Style x:Key="SectionTitle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="FontSize" Value="16"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="Margin" Value="0,3,0,3"/>
	</Style>

	<Style x:Key="Text" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="FontSize" Value="16"/>
		<Setter Property="Margin" Value="10,3,0,0"/>
	</Style>

	<Style x:Key="DbmlActionButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="HorizontalAlignment" Value="Center" />
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5" />
	</Style>

	<Style x:Key="ProcMappingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="Background" Value="Transparent" />
		<!--<Setter Property="HorizontalAlignment" Value="Center" />
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5" />-->
	</Style>

	<Style x:Key="DbmlActionButtonPanel" TargetType="{x:Type StackPanel}">
		<Setter Property="Margin" Value="8 0 8 0" />
		<Setter Property="Orientation" Value="Horizontal" />
		<Setter Property="HorizontalAlignment" Value="Center" />
		<Setter Property="VerticalAlignment" Value="Center" />
	</Style>

	<Style x:Key="DbmlAction" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="Margin" Value="5 0 5 0" />
		<Setter Property="FontSize" Value="18" />
	</Style>

	<Style x:Key="DatabaseNameBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
		<Setter Property="FontFamily" Value="Trebuchet MS"/>
		<Setter Property="TextAlignment" Value="Left"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
	</Style>

	<Style x:Key="Databases" TargetType="ItemsControl">
		<Setter Property="Margin" Value="0"/>
		<Setter Property="Grid.Row" Value="1"/>
		<!--<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ItemsControl}">
                    <Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer CanContentScroll="true" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Padding="{TemplateBinding Padding}">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>-->
	</Style>

	<Style x:Key="Tables" TargetType="ListBox">
		<!--<Setter Property="Margin" Value="10 5 10 10"/>-->

		<Setter Property="Grid.Column" Value="0"/>
		<Setter Property="Grid.Row" Value="3"/>
		<Setter Property="Grid.RowSpan" Value="2"/>
		<Setter Property="Background" Value="White"/>
	</Style>

	<Style x:Key="TableItem" TargetType="ListBoxItem">
		<!--<Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="ListBoxItem.BitmapEffect">
                    <Setter.Value>
                        <OuterGlowBitmapEffect GlowColor="Cornsilk" GlowSize="4"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="ListBoxItem.BitmapEffect">
                    <Setter.Value>
                        <OuterGlowBitmapEffect GlowColor="Cornsilk" GlowSize="14"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>-->
	</Style>

	<!--Scrollbar Buttons-->
	<Style x:Key="ScrollButtons" TargetType="{x:Type RepeatButton}">
		<Setter Property="Focusable" Value="false" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Border Name="Border" Background="Transparent">
						<ContentPresenter Name="ContentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--Scrollbar Thumbs-->
	<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Thumb}">
					<Grid Name="Grid">
						<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent" />
						<Rectangle Name="Rectangle1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="7" Height="Auto" RadiusX="4" RadiusY="4" Fill="{TemplateBinding Background}" />
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="Tag" Value="Horizontal">
							<Setter TargetName="Rectangle1" Property="Width" Value="Auto" />
							<Setter TargetName="Rectangle1" Property="Height" Value="7" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}">
		<Setter Property="Background" Value="{DynamicResource MainWindowBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
		<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSizeKey}}" />
		<Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MessageFontStyleKey}}" />
		<Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeightKey}}" />
		<Setter Property="Foreground" Value="lime" />
		<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
		<Setter Property="BorderThickness" Value="2.0" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
		<Setter Property="Padding" Value="3,4,3,4" />
		<Setter Property="AllowDrop" Value="True" />
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		<!--<Setter Property="RenderTransform">
            <Setter.Value>
                <TranslateTransform X="70" Y="-20" />
            </Setter.Value>
        </Setter>-->
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TextBox}">
					<Grid>
						<Rectangle RadiusX="5" RadiusY="5">
							<Rectangle.Fill>
								<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
									<LinearGradientBrush.GradientStops>
										<GradientStop Offset="0" Color="#333333" />
										<GradientStop Offset="1" Color="black" />
									</LinearGradientBrush.GradientStops>
								</LinearGradientBrush>
							</Rectangle.Fill>
							<Rectangle.Stroke>
								<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
									<LinearGradientBrush.GradientStops>
										<GradientStop Offset="0" Color="#666666" />
										<GradientStop Offset="1" Color="black" />
									</LinearGradientBrush.GradientStops>
								</LinearGradientBrush>
							</Rectangle.Stroke>
						</Rectangle>
						<ScrollViewer x:Name="PART_ContentHost" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Padding="{TemplateBinding Padding}" Focusable="false">
						</ScrollViewer>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
			</Trigger>
			<!--<Trigger Property="Width" Value="Auto">
                <Setter Property="MinWidth" Value="100" />
            </Trigger>-->
		</Style.Triggers>
	</Style>

	<!--ScrollBars-->
	<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
		<Setter Property="Stylus.IsFlicksEnabled" Value="false" />
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrush}}" />
		<Setter Property="Background" Value="{DynamicResource SliderGrad}" />
		<Setter Property="Width" Value="12" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ScrollBar}">
					<Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidth}}" Background="{TemplateBinding Background}">
						<Grid.RowDefinitions>
							<RowDefinition MaxHeight="18" />
							<RowDefinition Height="0.00001*" />
							<RowDefinition MaxHeight="18" />
						</Grid.RowDefinitions>
						<RepeatButton x:Name="DecreaseRepeat" Command="ScrollBar.LineUpCommand" Style="{DynamicResource ScrollButtons}" Foreground="{DynamicResource ButtonDefaultBrush}">
							<Path x:Name="DecreaseArrow" Data="F1 M 3.5,0L 0,7L 7,7L 3.5,0 Z " HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{Binding ElementName=DecreaseRepeat, Path=Foreground}" />
						</RepeatButton>
						<Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="true" Focusable="false">
							<Track.Thumb>
								<Thumb x:Name="Thumb" Background="{DynamicResource ButtonDefaultBrush}" Style="{DynamicResource ScrollThumbs}" />
							</Track.Thumb>
							<Track.IncreaseRepeatButton>
								<RepeatButton x:Name="PageUp" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="false" />
							</Track.IncreaseRepeatButton>
							<Track.DecreaseRepeatButton>
								<RepeatButton x:Name="PageDown" Command="ScrollBar.PageUpCommand" Opacity="0" Focusable="false" />
							</Track.DecreaseRepeatButton>
						</Track>
						<RepeatButton x:Name="IncreaseRepeat" Grid.Row="2" Command="ScrollBar.LineDownCommand" Style="{DynamicResource ScrollButtons}">
							<Path x:Name="IncreaseArrow" Data="F1 M 3.5,7L 7,0L 0,0L 3.5,7 Z " Fill="{DynamicResource ButtonDefaultBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</RepeatButton>
					</Grid>

					<ControlTemplate.Triggers>
						<Trigger SourceName="IncreaseRepeat" Property="IsMouseOver" Value="true">
							<Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="IncreaseArrow" Property="Fill" />
						</Trigger>
						<Trigger SourceName="DecreaseRepeat" Property="IsMouseOver" Value="true">
							<Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="DecreaseArrow" Property="Fill" />
						</Trigger>
						<Trigger SourceName="Thumb" Property="IsMouseOver" Value="true">
							<Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="Thumb" Property="Background" />
						</Trigger>
						<Trigger SourceName="Thumb" Property="IsDragging" Value="true">
							<Setter Value="{DynamicResource DarkBrush}" TargetName="Thumb" Property="Background" />
						</Trigger>
						<Trigger SourceName="IncreaseRepeat" Property="IsPressed" Value="true">
							<Setter Value="{DynamicResource DarkBrush}" TargetName="IncreaseArrow" Property="Fill" />
						</Trigger>
						<Trigger SourceName="DecreaseRepeat" Property="IsPressed" Value="true">
							<Setter Value="{DynamicResource DarkBrush}" TargetName="DecreaseArrow" Property="Fill" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Value="{DynamicResource LayerChild1Brush}" TargetName="IncreaseArrow" Property="Fill" />
							<Setter Value="{DynamicResource LayerChild1Brush}" TargetName="DecreaseArrow" Property="Fill" />
							<Setter TargetName="Thumb" Property="Visibility" Value="Collapsed" />
						</Trigger>
						<Trigger Property="Orientation" Value="Horizontal">
							<Setter TargetName="GridRoot" Property="LayoutTransform">
								<Setter.Value>
									<RotateTransform Angle="-90" />
								</Setter.Value>
							</Setter>
							<Setter TargetName="PART_Track" Property="LayoutTransform">
								<Setter.Value>
									<RotateTransform Angle="-90" />
								</Setter.Value>
							</Setter>
							<Setter Property="Width" Value="Auto" />
							<Setter Property="Height" Value="12" />
							<Setter TargetName="Thumb" Property="Tag" Value="Horizontal" />
							<Setter TargetName="DecreaseRepeat" Property="Command" Value="ScrollBar.LineLeftCommand" />
							<Setter TargetName="IncreaseRepeat" Property="Command" Value="ScrollBar.LineRightCommand" />
							<Setter TargetName="PageDown" Property="Command" Value="ScrollBar.PageLeftCommand" />
							<Setter TargetName="PageUp" Property="Command" Value="ScrollBar.PageRightCommand" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--ScrollViewer-->
	<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ScrollViewer}">
					<Border Background="{TemplateBinding Background}" CornerRadius="4" BorderBrush="{TemplateBinding Background}" BorderThickness="2">
						<Grid Name="Grid">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="*" />
								<RowDefinition Height="Auto" />
							</Grid.RowDefinitions>
							<ScrollContentPresenter Name="ScrollContentPresenter" Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" />
							<ScrollBar Name="PART_HorizontalScrollBar" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
							<ScrollBar Name="PART_VerticalScrollBar" Margin="1,0,0,0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--CheckBox Focus Visual Style-->
	<Style x:Key="CheckBoxFocusVisualStyle">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle SnapsToDevicePixels="true" Stroke="{DynamicResource ControlFocusBorderBrush}" StrokeThickness="1" Width="12" Height="12" HorizontalAlignment="Left" VerticalAlignment="Center" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--ListBox Item Focus Style-->
	<Style x:Key="ListItemFocusVisualStyle">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle SnapsToDevicePixels="true" Stroke="{DynamicResource ControlFocusBorderBrush}" StrokeThickness="1" Margin="1" RadiusX="2" RadiusY="2" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--CheckBox Style-->
	<Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
		<Setter Property="Background" Value="{DynamicResource PopUpBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultBorderBrush}" />
		<Setter Property="FontFamily" Value="{DynamicResource MessageFontFamily}" />
		<Setter Property="FontSize" Value="{DynamicResource MessageFontSize}" />
		<Setter Property="FontWeight" Value="{DynamicResource MessageFontWeight}" />
		<Setter Property="Padding" Value="4,0,0,0" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisualStyle}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type CheckBox}">
					<Grid Background="Transparent" SnapsToDevicePixels="true">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
						<Border Width="12" Height="12" VerticalAlignment="Center" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
							<Path Name="CheckMark" Fill="{DynamicResource Text1Brush}" Stretch="Fill" Margin="0,0,0,0" Data="{StaticResource Checkmark}" Visibility="Collapsed" Width="8" Height="8" />
						</Border>
						<ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
					</Grid>

					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Value="{DynamicResource ToggleButtonFocusedBorderBrush}" Property="BorderBrush" />
						</Trigger>
						<Trigger Property="IsChecked" Value="True">
							<Setter TargetName="CheckMark" Property="Visibility" Value="Visible" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Value="{DynamicResource DisabledTextBrush}" Property="Foreground" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--ListBox Item-->
	<Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="Background" Value="{DynamicResource BackgroundBrush}" />
		<Setter Property="FontFamily" Value="{DynamicResource MessageFontFamily}" />
		<Setter Property="FontSize" Value="{DynamicResource MessageFontSize}" />
		<Setter Property="FontWeight" Value="{DynamicResource MessageFontWeight}" />
		<Setter Property="Padding" Value="4,2,4,2" />
		<Setter Property="MinHeight" Value="20" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="FocusVisualStyle" Value="{DynamicResource ListItemFocusVisualStyle}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBoxItem}">
					<Border Name="ListBoxItemRoot" CornerRadius="2" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
						<ContentPresenter Name="ListBoxItemContent" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>

		<Style.Triggers>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="IsMouseOver" Value="true" />
					<Condition Property="IsSelected" Value="false" />
				</MultiTrigger.Conditions>
				<Setter Property="Background" Value="{DynamicResource ButtonOverBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource BackgroundBrush}" />
			</MultiTrigger>
			<Trigger Property="IsSelected" Value="true">
				<Setter Property="Background" Value="{DynamicResource ListSelectionGrad}" />
				<Setter Property="Foreground" Value="{DynamicResource ListSelectedTextBrush}" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{DynamicResource DisabledTextBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>

	<!--ListBox Style-->
	<Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
		<Setter Property="BorderBrush" Value="{DynamicResource RecessedBrush}" />
		<Setter Property="Background" Value="{DynamicResource RecessedBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource Text2Brush}" />
		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBox}">
					<Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
						<ScrollViewer CanContentScroll="true" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Padding="{TemplateBinding Padding}">
							<ItemsPresenter />
						</ScrollViewer>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--TabItem Base-->
	<Style x:Key="{x:Type TabItem}" TargetType="{x:Type TabItem}">
		<Setter Property="Background" Value="{DynamicResource TabNotSelectedBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
		<Setter Property="BorderBrush" Value="{x:Null}" />
		<Setter Property="MinHeight" Value="20" />
		<Setter Property="FontFamily" Value="{DynamicResource MessageFontFamily}" />
		<Setter Property="FontSize" Value="{DynamicResource MessageFontSize}" />
		<Setter Property="FontWeight" Value="{DynamicResource MessageFontWeight}" />
		<Setter Property="SnapsToDevicePixels" Value="true" />
		<Setter Property="IsTabStop" Value="false" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabItem}">
					<Border SnapsToDevicePixels="True" Name="Border" Margin="0,0,2,0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" CornerRadius="3,3,0,0" Height="{TemplateBinding Height}">
						<ContentPresenter Name="ContentSite" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0,5,0" VerticalAlignment="Center" RecognizesAccessKey="true" ContentSource="Header" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter TargetName="Border" Property="CornerRadius" Value="0,0,3,3" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsSelected" Value="true">
				<Setter Property="Canvas.ZIndex" Value="100" />
				<Setter Property="Background" Value="{DynamicResource RecessedBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource WhiteBrush}" />
			</Trigger>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="IsMouseOver" Value="true" />
					<Condition Property="IsSelected" Value="false" />
				</MultiTrigger.Conditions>
				<Setter Property="Background" Value="{DynamicResource ButtonOverBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource WhiteBrush}" />
			</MultiTrigger>
			<Trigger Property="IsEnabled" Value="false">
				<Setter Property="Background" Value="{DynamicResource TabNotSelectedBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource DisabledTextBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>

	<!--Tab Control-->
	<Style x:Key="BaseTabControl" TargetType="{x:Type TabControl}">
		<Setter Property="ClipToBounds" Value="true" />
		<Setter Property="BorderBrush" Value="{x:Null}" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Background" Value="{DynamicResource ButtonDefaultBrush}" />
		<Setter Property="Padding" Value="0" />
		<Setter Property="Focusable" Value="false" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid Name="Grid1" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Name="ColumnDefinition0" />
							<ColumnDefinition Name="ColumnDefinition1" Width="0px" />
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Name="RowDefinition0" Height="Auto" />
							<RowDefinition Name="RowDefinition1" Height="*" />
						</Grid.RowDefinitions>
						<TabPanel Name="HeaderPanel" Background="Transparent" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="0" IsItemsHost="true" />
						<Border Name="ContentPanel" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1" CornerRadius="0,0,3,3">
							<ContentPresenter Name="ContentSite" Margin="{TemplateBinding Padding}" Content="{TemplateBinding SelectedContent}" ContentTemplate="{TemplateBinding SelectedContentTemplate}" ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" />
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
							<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
							<Setter TargetName="ContentPanel" Property="BorderThickness" Value="0,0,0,1" />
							<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
							<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
							<Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Right">
							<Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
							<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
							<Setter TargetName="ContentPanel" Property="BorderThickness" Value="0,0,1,0" />
							<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
							<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
							<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
							<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
							<Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--TabControl Style-->
	<Style x:Key="{x:Type TabControl}" BasedOn="{StaticResource BaseTabControl}" TargetType="{x:Type TabControl}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid Name="Grid1" KeyboardNavigation.TabNavigation="Local">
						<Grid.ColumnDefinitions>
							<ColumnDefinition />
							<ColumnDefinition Width="0px" />
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Name="RowDefinition0" Height="Auto" />
							<RowDefinition Name="RowDefinition1" Height="*" />
						</Grid.RowDefinitions>
						<UniformGrid Name="HeaderPanel" Background="Transparent" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="0" IsItemsHost="true" Rows="1" Margin="0,0,-2,0" />
						<Border Name="ContentPanel" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1" CornerRadius="0,0,3,3">
							<ContentPresenter Name="ContentSite" Margin="{TemplateBinding Padding}" Content="{TemplateBinding SelectedContent}" ContentTemplate="{TemplateBinding SelectedContentTemplate}" ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" />
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
							<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
							<Setter TargetName="ContentPanel" Property="BorderThickness" Value="0,0,0,1" />
							<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
							<Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
							<Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


	<!--*****************************************************************-->
	<FontFamily x:Key="CaptionFontFamily">Calibri</FontFamily>
	<FontWeight x:Key="CaptionFontWeight">Bold</FontWeight>
	<Sys:Double x:Key="CaptionFontSize">14</Sys:Double>
	<FontFamily x:Key="MessageFontFamily">Helvetica</FontFamily>
	<FontWeight x:Key="MessageFontWeight">Normal</FontWeight>
	<Sys:Double x:Key="MessageFontSize">12</Sys:Double>

	<Color x:Key="BackgroundColor">#FF333333</Color>
	<Color x:Key="ButtonDefaultColor">#FF808080</Color>
	<Color x:Key="ButtonOverColor">#FFAAAAAA</Color>
	<Color x:Key="ButtonSelectColor">#FFCCCCCC</Color>
	<Color x:Key="ControlFocusBorderColor">#FFE5E5E5</Color>
	<Color x:Key="DarkColor">#FF1A1A1A</Color>
	<Color x:Key="DisabledTextColor">#FF808080</Color>
	<Color x:Key="LayerChild1Color">#FF5C5C5C</Color>
	<Color x:Key="ListBackgroundColor">#FFAAAAAA</Color>
	<Color x:Key="ListSelectedTextColor">#FF000000</Color>
	<Color x:Key="ListSelectionGradStartColor">#FF9A9A9A</Color>
	<Color x:Key="ListSelectionGradEndColor">#FFE3E3E3</Color>
	<Color x:Key="MainWindowBackgroundColor">#FF333333</Color>
	<Color x:Key="PopUpColor">#FF666666</Color>
	<Color x:Key="RecessedColor">#FF424242</Color>
	<Color x:Key="RaisedColor">#FF424242</Color>
	<Color x:Key="SliderGradStart">#FF424242</Color>
	<Color x:Key="SliderGradEnd">#FF4C4C4C</Color>
	<Color x:Key="TabNotSelectedColor">#808080</Color>
	<Color x:Key="Text1Color">#FFFFFFFF</Color>
	<Color x:Key="Text2Color">#FFDCDCDC</Color>
	<Color x:Key="TitleGradStart">#FF616161</Color>
	<Color x:Key="TitleGradEnd">#FF444444</Color>
	<Color x:Key="ToggleButtonDefaultBorderColor">#FF424242</Color>
	<Color x:Key="ToggleButtonDisabledTextColor">#FF424242</Color>
	<Color x:Key="ToggleButtonFocusedBorderColor">#FFE5E5E5</Color>
	<Color x:Key="WhiteColor">#FFFFFFFF</Color>

	<SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}" />
	<SolidColorBrush x:Key="ButtonDefaultBrush" Color="{StaticResource ButtonDefaultColor}" />
	<SolidColorBrush x:Key="ButtonOverBrush" Color="{StaticResource ButtonOverColor}" />
	<SolidColorBrush x:Key="ButtonSelectBrush" Color="{StaticResource ButtonSelectColor}" />
	<SolidColorBrush x:Key="ControlFocusBorderBrush" Color="{StaticResource ControlFocusBorderColor}" />
	<SolidColorBrush x:Key="DarkBrush" Color="{StaticResource DarkColor}" />
	<SolidColorBrush x:Key="DisabledTextBrush" Color="{StaticResource DisabledTextColor}" />
	<SolidColorBrush x:Key="LayerChild1Brush" Color="{StaticResource LayerChild1Color}" />
	<SolidColorBrush x:Key="ListBackgroundBrush" Color="{StaticResource ListBackgroundColor}" />
	<SolidColorBrush x:Key="ListSelectedTextBrush" Color="{StaticResource ListSelectedTextColor}" />
	<SolidColorBrush x:Key="MainWindowBackgroundBrush" Color="{StaticResource MainWindowBackgroundColor}" />
	<SolidColorBrush x:Key="PopUpBrush" Color="{StaticResource PopUpColor}" />
	<SolidColorBrush x:Key="RecessedBrush" Color="{StaticResource RecessedColor}" />
	<SolidColorBrush x:Key="RaisedBrush" Color="{StaticResource RaisedColor}" />
	<SolidColorBrush x:Key="TabNotSelectedBrush" Color="{StaticResource TabNotSelectedColor}" />
	<SolidColorBrush x:Key="Text1Brush" Color="{StaticResource Text1Color}" />
	<SolidColorBrush x:Key="Text2Brush" Color="{StaticResource Text2Color}" />
	<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="{StaticResource ToggleButtonDefaultBorderColor}" />
	<SolidColorBrush x:Key="ToggleButtonDisabledTextBrush" Color="{StaticResource ToggleButtonDisabledTextColor}" />
	<SolidColorBrush x:Key="ToggleButtonFocusedBorderBrush" Color="{StaticResource ToggleButtonFocusedBorderColor}" />
	<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource WhiteColor}" />

	<LinearGradientBrush x:Key="ListSelectionGrad" StartPoint="0,1" EndPoint="0,0">
		<LinearGradientBrush.GradientStops>
			<GradientStop Color="{StaticResource ListSelectionGradStartColor}" Offset="0" />
			<GradientStop Color="{StaticResource ListSelectionGradEndColor}" Offset="1" />
		</LinearGradientBrush.GradientStops>
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="SliderGrad" StartPoint="0,0" EndPoint="1,0">
		<LinearGradientBrush.GradientStops>
			<GradientStop Color="{StaticResource SliderGradStart}" Offset="0" />
			<GradientStop Color="{StaticResource SliderGradEnd}" Offset="1" />
		</LinearGradientBrush.GradientStops>
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="WindowTitleGrad" StartPoint="0,0" EndPoint="0,1">
		<LinearGradientBrush.GradientStops>
			<GradientStop Color="{StaticResource TitleGradStart}" Offset="0"/>
			<GradientStop Color="{StaticResource TitleGradStart}" Offset="0.49"/>
			<GradientStop Color="{StaticResource TitleGradEnd}" Offset="0.50"/>
			<GradientStop Color="{StaticResource TitleGradEnd}" Offset="1"/>
		</LinearGradientBrush.GradientStops>
	</LinearGradientBrush>

	<!--Window Close Button-->
	<DrawingImage x:Key="CloseButton">
		<DrawingImage.Drawing>
			<DrawingGroup>
				<DrawingGroup.Children>
					<GeometryDrawing Geometry="F1 M 1.98611,1.98611L 13.9861,13.9861">
						<GeometryDrawing.Pen>
							<Pen Thickness="3" LineJoin="Round" Brush="#FFFFFFFF"/>
						</GeometryDrawing.Pen>
					</GeometryDrawing>
					<GeometryDrawing Geometry="F1 M 13.9861,1.98611L 1.98611,13.9861">
						<GeometryDrawing.Pen>
							<Pen Thickness="3" LineJoin="Round" Brush="#FFFFFFFF"/>
						</GeometryDrawing.Pen>
					</GeometryDrawing>
				</DrawingGroup.Children>
			</DrawingGroup>
		</DrawingImage.Drawing>
	</DrawingImage>

	<Color x:Key="FilledColor" A="255" B="155" R="155" G="155"/>
	<Color x:Key="UnfilledColor" A="0" B="155" R="155" G="155"/>
	
	<Style x:Key="BusyAnimationStyle" TargetType="Control">
		<Setter Property="Background" Value="#7F000000"/>

		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Control">
					<ControlTemplate.Resources>
						<Storyboard x:Key="Animation0" BeginTime="00:00:00.0" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse0" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation1" BeginTime="00:00:00.2" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse1" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation2" BeginTime="00:00:00.4" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse2" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation3" BeginTime="00:00:00.6" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse3" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation4" BeginTime="00:00:00.8" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse4" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation5" BeginTime="00:00:01.0" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse5" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation6" BeginTime="00:00:01.2" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse6" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>

						<Storyboard x:Key="Animation7" BeginTime="00:00:01.4" RepeatBehavior="Forever">
							<ColorAnimationUsingKeyFrames 
                                Storyboard.TargetName="ellipse7" 
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                >
								<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
								<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>

					<ControlTemplate.Triggers>
						<Trigger Property="IsVisible" Value="True">
							<Trigger.EnterActions>
								<BeginStoryboard Storyboard="{StaticResource Animation0}" x:Name="Storyboard0" />
								<BeginStoryboard Storyboard="{StaticResource Animation1}" x:Name="Storyboard1"/>
								<BeginStoryboard Storyboard="{StaticResource Animation2}" x:Name="Storyboard2"/>
								<BeginStoryboard Storyboard="{StaticResource Animation3}" x:Name="Storyboard3"/>
								<BeginStoryboard Storyboard="{StaticResource Animation4}" x:Name="Storyboard4"/>
								<BeginStoryboard Storyboard="{StaticResource Animation5}" x:Name="Storyboard5"/>
								<BeginStoryboard Storyboard="{StaticResource Animation6}" x:Name="Storyboard6"/>
								<BeginStoryboard Storyboard="{StaticResource Animation7}" x:Name="Storyboard7"/>
							</Trigger.EnterActions>

							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="Storyboard0"/>
								<StopStoryboard BeginStoryboardName="Storyboard1"/>
								<StopStoryboard BeginStoryboardName="Storyboard2"/>
								<StopStoryboard BeginStoryboardName="Storyboard3"/>
								<StopStoryboard BeginStoryboardName="Storyboard4"/>
								<StopStoryboard BeginStoryboardName="Storyboard5"/>
								<StopStoryboard BeginStoryboardName="Storyboard6"/>
								<StopStoryboard BeginStoryboardName="Storyboard7"/>
							</Trigger.ExitActions>
						</Trigger>
					</ControlTemplate.Triggers>

					<Border
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}" 
                        Background="{TemplateBinding Background}"
                        >
						<Canvas Height="60" Width="60">
							<Canvas.Resources>
								<Style TargetType="Ellipse">
									<Setter Property="Width" Value="15"/>
									<Setter Property="Height" Value="15" />
									<Setter Property="Fill" Value="#009B9B9B" />
								</Style>
							</Canvas.Resources>

							<Ellipse x:Name="ellipse0" Canvas.Left="1.75" Canvas.Top="21"/>
							<Ellipse x:Name="ellipse1" Canvas.Top="7" Canvas.Left="6.5"/>
							<Ellipse x:Name="ellipse2" Canvas.Left="20.5" Canvas.Top="0.75"/>
							<Ellipse x:Name="ellipse3" Canvas.Left="34.75" Canvas.Top="6.75"/>
							<Ellipse x:Name="ellipse4" Canvas.Left="40.5" Canvas.Top="20.75" />
							<Ellipse x:Name="ellipse5" Canvas.Left="34.75" Canvas.Top="34.5"/>
							<Ellipse x:Name="ellipse6" Canvas.Left="20.75" Canvas.Top="39.75"/>
							<Ellipse x:Name="ellipse7" Canvas.Top="34.25" Canvas.Left="7" />
							<Ellipse Width="39.5" Height="39.5" Canvas.Left="8.75" Canvas.Top="8" Visibility="Hidden"/>
						</Canvas>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <!--ComboBox Close Button-->
    <DrawingImage x:Key="ComboBoxButtonIcon">
        <DrawingImage.Drawing>
            <GeometryDrawing>
                <GeometryDrawing.Pen>
                    <Pen Brush="{DynamicResource Text1Brush}" Thickness="2" />
                </GeometryDrawing.Pen>
                <GeometryDrawing.Geometry>
                    <PathGeometry PresentationOptions:Freeze="true">
                        <PathGeometry.Figures>
                            <PathFigure>
                                <PathFigure.Segments>
                                    <PolyLineSegment>
                                        <PolyLineSegment.Points>
                                            <Point X="0" Y="0" />
                                            <Point X="4" Y="5" />
                                            <Point X="8" Y="0" />
                                        </PolyLineSegment.Points>
                                    </PolyLineSegment>
                                </PathFigure.Segments>
                            </PathFigure>
                        </PathGeometry.Figures>
                    </PathGeometry>
                </GeometryDrawing.Geometry>
            </GeometryDrawing>
        </DrawingImage.Drawing>
    </DrawingImage>

    <!--ComboBox Item-->
    <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="{DynamicResource RecessedBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
        <Setter Property="FontFamily" Value="{DynamicResource MessageFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource MessageFontSize}" />
        <Setter Property="FontWeight" Value="{DynamicResource MessageFontWeight}" />
        <Setter Property="Padding" Value="4,2,4,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border Name="ListBoxItemRoot" CornerRadius="2" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <ContentPresenter Content="{TemplateBinding Content}" TextElement.Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="IsSelected" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{DynamicResource ButtonOverBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource BackgroundBrush}" />
            </MultiTrigger>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="{DynamicResource ListSelectionGrad}" />
                <Setter Property="Foreground" Value="{DynamicResource ListSelectedTextBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource DisabledTextBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--ComboBox Button-->
    <Style x:Key="ComboBoxButtonStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="Width" Value="Auto" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="BorderBrush" Value="{DynamicResource RecessedBrush}" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
                        </Grid.ColumnDefinitions>
                        <Border Name="ComboBoxButtonBorder" Grid.Column="1" Width="16" CornerRadius="2" Background="{DynamicResource ButtonDefaultBrush}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                            <Image Name="ComboBoxButtonArrow" Stretch="Fill" Width="8" Height="5" Source="{DynamicResource ComboBoxButtonIcon}" />
                        </Border>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter TargetName="ComboBoxButtonBorder" Value="{DynamicResource Text1Brush}" Property="BorderBrush" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="ComboBoxButtonBorder" Value="{DynamicResource ButtonOverBrush}" Property="Background" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="ComboBoxButtonBorder" Value="{DynamicResource DarkBrush}" Property="BorderBrush" />
                            <Setter TargetName="ComboBoxButtonBorder" Value="{DynamicResource RecessedBrush}" Property="Background" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ComboBox-->
    <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="MinWidth" Value="40" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="FontFamily" Value="{DynamicResource MessageFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource MessageFontSize}" />
        <Setter Property="FontWeight" Value="{DynamicResource MessageFontWeight}" />
        <Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush}" />
        <Setter Property="Background" Value="{DynamicResource BackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource ButtonBaseFocusVisualStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid>
                        <Border Background="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}" CornerRadius="4" Name="PART_MainBorder">
                            <Grid IsSharedSizeScope="true">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
                                </Grid.ColumnDefinitions>
                                <Border Name="SelectedItemBorder" Grid.ColumnSpan="2" Margin="1" CornerRadius="2" Background="{TemplateBinding Background}" />
                                <ContentPresenter Name="ContentSite" Grid.Column="1" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="4,2,1,2" VerticalAlignment="Center" TextElement.Foreground="{TemplateBinding Foreground}"/>
                                <TextBox Name="PART_EditableTextBox" MinHeight="0" Height="Auto" Grid.Column="1" Visibility="Collapsed" Padding="1,0,0,0" IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding Foreground}" FocusVisualStyle="{DynamicResource ComboBoxFocusVisualStyle}" />
                                <ToggleButton Name="DropDownButton" Focusable="false" Margin="0" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource ComboBoxButtonStyle}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Grid>
                        </Border>
                        <Controls:FXPopup Name="PART_Popup" Placement="Bottom" Focusable="false" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}">
                            <Border Name="DropDownBorder" Background="{DynamicResource BackgroundBrush}" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
                                <ScrollViewer CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
                                    <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle" Margin="1" />
                                </ScrollViewer>
                            </Border>
                        </Controls:FXPopup>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin" Value="true" />
                                <Condition Property="IsDropDownOpen" Value="false" />
                                <Condition Property="IsEditable" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="PART_EditableTextBox" Value="{DynamicResource Text1Brush}" Property="Foreground" />
                            <Setter TargetName="ContentSite" Value="{DynamicResource Text1Brush}" Property="TextElement.Foreground" />
                        </MultiTrigger>
                        <Trigger Property="IsEditable" Value="true">
                            <Setter TargetName="SelectedItemBorder" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ContentSite" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="PART_MainBorder" Value="{DynamicResource RecessedBrush}" />
                            <Setter Property="Background" Value="{DynamicResource RecessedBrush}" />
                            <Setter Property="Foreground" Value="{DynamicResource DisabledTextBrush}" />
                            <Setter Property="Visibility" Value="Collapsed" TargetName="DropDownButton"/>
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="true" />
                    <Condition Property="IsDropDownOpen" Value="false" />
                    <Condition Property="IsEditable" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
            </MultiTrigger>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>

